<?php
namespace Admin\Controller;
use Think\Controller;
class ClassController extends BaseController {
    public function index(){
        $this->login_verify();
        $this->display();
    }
    public function classSet(){
    	// var_dump($_POST);
    	$class=M('class');
    	$data['name']=$_POST['title'];
    	$data['content']=$_POST['content'];
    	if($class->add($data)){
    		$this->success('添加成功', U('Class/index'));
    	}else{
    		$this->error('添加失败');
    	}
    }
}